﻿using Infrastructure.Tool;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure.Pub
{
     public class PubGet
    {
        public static string GetUserKey
        {
            get
            {
                string uid = Generator.GetCookie(PubConst.CookieUserKey);
                if (!string.IsNullOrWhiteSpace(uid))
                {
                    return string.Format(PubConst.CacheUserKey, uid);
                }
                else
                {
                    return "";
                }
            }
        }

        public static string GetMemberKey
        {
            get
            {
                string uid = Generator.GetCookie(PubConst.CookieMemberKey);
                if (!string.IsNullOrWhiteSpace(uid))
                {
                    return string.Format(PubConst.CacheMemberKey, uid);
                }
                else
                {
                    return "";
                }
            }
        }

        public static string GetMemberId
        {
            get
            {
                return Generator.GetCookie(PubConst.CookieMemberKey);
            }
        }
    }
}
